﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
	class Program
	{
		static void Main(string[] args)
		{
			Database.SetInitializer(new DbInitalizer());
			using (Admin1000Context db = new Admin1000Context())
			{

				db.Products.ToList();
				

				var pro = db.Products.ToList();
				Console.WriteLine("{0}\t\t{1}\t\t{2}\t\t{3}\t", "商品", "价格", "创建时间", "更新时间");
				foreach (var item in pro)
				{
					Console.WriteLine("{0}\t{1}\t\t{2}\t{3}\t", item.ProductName, item.Price, item.CreationTime, item.UpdateTime);
				}
			}
			Console.Read();

		}
	}
}
